import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

import PerEc from '../views/per/PerEc.vue'
import PerMv from '../views/per/PerMv.vue'
import PerTrain from '../views/per/PerTrain.vue'
import SysHr from '../views/sys/hr.vue'
import Login from '../views/Login.vue'
import SysBasic from '../views/sys/basic.vue'
import EmpBasic from '../views/emp/EmpBasic.vue'
import SalSob from '../views/sal/sob.vue'
import SalSobCfg from '../views/sal/sobcfg.vue'
import SalMonth from '../views/sal/month.vue'
import SalSearch from '../views/sal/search.vue'
import SysLog from '../views/sys/log.vue'
import SysCfg from '../views/sys/cfg.vue'
import SysData from '../views/sys/data.vue'
import SysInit from '../views/sys/init.vue'
import PerEmp from '../views/per/PerEmp.vue'
import PerSalary from '../views/per/PerSalary.vue'
import EmpAdv from '../views/emp/EmpAdv.vue'
import StaAll from '../views/sta/all.vue'
import StaRecord from '../views/sta/record.vue'
import StaPers from '../views/sta/pers.vue'
import StaScore from '../views/sta/score.vue'
import homePage from '../components/homePage.vue'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'Login',
        component: Login,
    },
    {
        path: '/home',
        name: 'Home',
        component: Home,
        children: [
            {
                path: '/',
                name: 'homePage',
                component: homePage
            },
            {
                path: '/sys/basic',
                name: 'SysBasic',
                component: SysBasic,
            },
            {
                path: '/per/ec',
                name: 'PerEc',
                component: PerEc
            },
            {
                path: '/per/mv',
                name: 'PerMv',
                component: PerMv
            },
            {
                path: '/per/train',
                name: 'PerTrain',
                component: PerTrain
            },
            {
                path: '/sys/hr',
                name: 'SysHr',
                component: SysHr,
            },
            {
                path: '/emp/basic',
                name: 'EmpBasic',
                component: EmpBasic
            },
            {
                path: '/sal/sob',
                name: 'SalSob',
                component: SalSob
            },
            {
                path: '/sal/sobcfg',
                name: 'SalSobCfg',
                component: SalSobCfg
            },
            {
                path: '/sal/month',
                name: 'SalMonth',
                component: SalMonth
            },
            {
                path: '/sal/search',
                name: 'SalSearch',
                component: SalSearch
            },
            {
                path: '/sys/log',
                name: 'SysLog',
                component: SysLog,
            },
            {
                path: '/sys/cfg',
                name: 'SysCfg',
                component: SysCfg,
            },
            {
                path: '/sys/data',
                name: 'SysData',
                component: SysData,
            },
            {
                path: '/sys/init',
                name: 'SysInit',
                component: SysInit,
            },
            {
                path: '/per/emp',
                name: 'PerEmp',
                component: PerEmp
            },
            {
                path: '/per/salary',
                name: 'PerSalary',
                component: PerSalary
            },
            {
                path: '/emp/adv',
                name: 'EmpAdv',
                component: EmpAdv
            },
            {
                path: '/sta/all',
                name: 'StaAll',
                component: StaAll
            },
            {
                path: '/sta/score',
                name: 'StaScore',
                component: StaScore
            },
            {
                path: '/sta/record',
                name: 'StaRecord',
                component: StaRecord
            },
            {
                path: '/sta/pers',
                name: 'StaPers',
                component: StaPers
            },
            {
                path: "/emp/basic",
                name: "/EmpBasic",
                component: EmpBasic,
               },
        ]

    }
]

const router = new VueRouter({
    routes
})

export default router